package com.salelogistics.sale.mapper;

import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.salelogistics.sale.domain.SmsDeliveryPlan;
import com.salelogistics.sale.domain.SmsDeliveryPlanDetails;
import com.salelogistics.sale.domain.dto.DeliveryPlanDetailsDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 月配送计划详细货物Mapper接口
 * 
 * @author Hu Kangying
 * @date 2023-07-13
 */
@Mapper
public interface SmsDeliveryPlanDetailsMapper extends BaseMapper<SmsDeliveryPlanDetails>
{
    /**
     * 查询月配送计划详细货物
     * 
     * @param id 月配送计划详细货物主键
     * @return 月配送计划详细货物
     */
    boolean updateDecomposable(@Param("planId")String planId, @Param("materialId")String materialId, @Param("count") String count);

    boolean updateCompletedCount(@Param("planId")String planId, @Param("materialId")String materialId, @Param("count") String count);
    SmsDeliveryPlanDetails selectSmsDeliveryPlanDetailsById(Long id);

    List<DeliveryPlanDetailsDto> selectSmsDeliveryPlanDetailsByPlanId(Long planId);


    /**
     * 查询月配送计划详细货物列表
     * 
     * @param smsDeliveryPlanDetails 月配送计划详细货物
     * @return 月配送计划详细货物集合
     */
    public List<SmsDeliveryPlanDetails> selectSmsDeliveryPlanDetailsList(SmsDeliveryPlanDetails smsDeliveryPlanDetails);

    /**
     * 新增月配送计划详细货物
     * 
     * @param smsDeliveryPlanDetails 月配送计划详细货物
     * @return 结果
     */
    public int insertSmsDeliveryPlanDetails(SmsDeliveryPlanDetails smsDeliveryPlanDetails);

    /**
     * 修改月配送计划详细货物
     * 
     * @param smsDeliveryPlanDetails 月配送计划详细货物
     * @return 结果
     */
    public int updateSmsDeliveryPlanDetails(SmsDeliveryPlanDetails smsDeliveryPlanDetails);

    /**
     * 删除月配送计划详细货物
     * 
     * @param id 月配送计划详细货物主键
     * @return 结果
     */
    public int deleteSmsDeliveryPlanDetailsById(Long id);

    /**
     * 批量删除月配送计划详细货物
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSmsDeliveryPlanDetailsByIds(Long[] ids);
}
